Problem: James is playing his favorite game at the arcade. After playing the game $3$ times, he has $8$ tokens remaining. He initially had $20$ tokens, and the game costs the same number of tokens each time. The number $t$ of tokens James has is a function of $g$, the number of games he plays. Write the function's formula. $t=$
Answer: Each game costs a constant number of tokens, so we're dealing with a linear relationship. We could write the desired formula in slope-intercept form: $t= mg+ b$. In this form, $ m$ gives us the slope of the graph of the function and $ b$ gives us the $y$ -intercept. Our goal is to find the values of $ m$ and $ b$ and substitute them into this formula. We know that James initially has $20$ tokens, so the $y$ -intercept ${b}$ is ${20}$, and our function looks like $t={m}g+{20}$. We also know that after playing $3$ games, James has $8$ tokens remaining, which means when $g=3$, $t=8$. We can use this and the $y$ -intercept to find ${m}$ : $\begin{aligned} {m}&=\dfrac{t_2-t_1}{g_2-g_1} \\\\ &=\dfrac{8-20}{3-0} \\\\ &=\dfrac{-12}{3} \\\\ &={-4} \end{aligned}$ This means each game James plays costs him $4$ tokens. Since ${m}={-4}$ and ${b}={20}$, the desired formula is: $t={-4} g + {20}$